﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XuanXiang.Infrastructure.Attr;
using XuanXiang.Infrastructure.Dto.Request;
using XuanXiang.Infrastructure.Dto.Request.Login;
using XuanXiang.Infrastructure.Dto.Request.Merchant;
using XuanXiang.Infrastructure.Dto.Response;
using XuanXiang.Infrastructure.Dto.Response.Merchant;
using XuanXiang.Infrastructure.EFCore.MySql;

namespace XuanXiang.Service.Interface
{
    [Provider_]
    public interface I_Merchant_Service
    {
        /// <summary>
        /// 新增商户
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> AddMerchant(Add_Merchant_Dto dto);

        /// <summary>
        /// 新增商品在购物车
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Add_MerchantCar(Add_Car_Dto dto);

        /// <summary>
        /// 删除商户
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Delete_Merchant(Delete_Dto dto);

        /// <summary>
        /// 获取商户列表
        /// </summary>
        /// <param name="fenye_Dto"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Get_Merchant(Fenye_Dto fenye_Dto);

        /// <summary>
        /// 商户的禁用/启用
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> IsBan_Merchant(IsBan_Dto dto);

        /// <summary>
        /// 提交订单
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Merchant_CreateOrder(string mId, Add_Orders_Dto dto);

        /// <summary>
        /// 获取我的购物车
        /// </summary>
        /// <param name="mId"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Merchant_GetMyCar(string mId);

        /// <summary>
        /// 获取单个商品详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Merchant_GetSingleGoods(string? id);
        
        /// <summary>
        /// 从购物车移除商品
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Merchant_RemoveCar(Add_Car_Dto dto);

        /// <summary>
        /// 商品搜素
        /// </summary>
        /// <param name="v"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Merchant_SearchGoods(Fenye_Dto dto);

        /// <summary>
        /// 商户登录
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Merchant_Logins(Login_dto dto);

        /// <summary>
        /// 检查商户登录
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        Merchant_Dto Check_Merchant_Login(string code,string account);

        /// <summary>
        /// 获取商品的猜你喜欢
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Merchant_GetLikeGoods(string? id, string? tid);

        /// <summary>
        /// 更新购物车
        /// </summary>
        /// <param name="id"></param>
        /// <param name="cars"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Update_Cars(string? id, CarDetails_Dto[]? cars);

        /// <summary>
        /// 商户获取订单
        /// </summary>
        /// <param name="fenye_Dto"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Merchant_Get_Orders(Fenye_Dto fenye_Dto);

        /// <summary>
        /// 商户-取消订单
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Merchant_CancelOrder(IsBan_Dto dto);

        /// <summary>
        /// 商户-获取订单统计数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Merchant_GetMeStatistics(string? id);

        /// <summary>
        /// 获取单个商户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Get_Single_Merchant(string? id);

        /// <summary>
        /// 获取单个商户的订单列表
        /// </summary>
        /// <param name="fenye_Dto"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Get_Merchant_Order(Fenye_Dto fenye_Dto);

        /// <summary>
        /// 获取单个订单详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Merchant_GetSingleOrder(string? id);

        /// <summary>
        /// 商户-收货
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Merchant_ReceiveGoods(string? id);


        /// <summary>
        /// 商户-获取全部订单
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Merchant_GetAllOrder(Fenye_Dto dto);

        /// <summary>
        /// 商户-获取热门商品
        /// </summary>
        /// <returns></returns>
        Task<Api_Result_Dto> Merchant_GetHotGoods();

        /// <summary>
        /// 获取热卖榜单商品
        /// </summary>
        /// <param name="fenye_Dto"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Merchant_GetHotBuyGoods(Fenye_Dto fenye_Dto);

        /// <summary>
        ///获取未发货的订单
        /// </summary>
        /// <param name="fenye_Dto"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Merchant_Me_GetNoSendOrder(Fenye_Dto fenye_Dto);

        /// <summary>
        /// 获取已取消的订单
        /// </summary>
        /// <param name="fenye_Dto"></param>
        /// <returns></returns>
        Task<Api_Result_Dto> Merchant_Me_GetCancelOrder(Fenye_Dto fenye_Dto);
    }
}
